home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / demo5.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-13  |  1.9 KB  |  79 lines

  1. /*                                                            
  2.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  3.   ▒                                                          ▒
  4.   ▒                                                          ▒
  5.   ▒             Neuromancer's Graphics Library               ▒
  6.   ▒                     Version 1.0c                         ▒
  7.   ▒                                                          ▒
  8.   ▒  This routine demonstrates ellipse and filled ellipsed   ▒
  9.   ▒  primitives.                                             ▒   
  10.   ▒                                                          ▒ 
  11.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  12.   ▒                                                          ▒
  13.   ▒     Project:    MTLIB01.LIB                              ▒
  14.   ▒                 DEMO5.CPP                                ▒
  15.   ▒                                                          ▒ 
  16.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  17. */
  18. #include <iostream.h>
  19. #include <stdlib.h> 
  20. #include <conio.h>
  21. #include "video.h"
  22. #include "ellipse.h"
  23.  
  24.  
  25. void main(void)
  26. {
  27.     int x,y,major, minor,color;
  28.     int ch;
  29.     
  30.  
  31.     mtSetVGAMode();            //Set up VGA Mode
  32.  
  33.     mtSetWindow(15,15,304,184);    //set up clip region
  34.     mtClrScr(15);            //clear region to color 15
  35.  
  36.     while(!kbhit())
  37.     {  
  38.           x = random(320);
  39.         y = random(200);
  40.         major = random(40);
  41.         color = random(256);
  42.         minor = random(40);
  43.  
  44.         mtCEllipse(x,y,major,minor,color);
  45.     }
  46.  
  47.     mtClrScr(0);
  48.     
  49.     getch();
  50.  
  51.     while(!kbhit())
  52.     {  
  53.           x = random(320);
  54.         y = random(200);
  55.         major = random(40);
  56.         color = random(256);
  57.         minor = random(40);
  58.  
  59.         mtCFillEllipse(x,y,major,minor,color);
  60.         
  61.     }
  62.  
  63.     getch();
  64.     
  65.     mtSetTextMode();
  66.  
  67.     cout << "Thank you for using the library!" << endl;
  68.  
  69.     exit(0);
  70.     
  71. }
  72.  
  73.            
  74.             
  75.  
  76.            
  77.  
  78.            
  79.